﻿using Abp.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Hosting;
//using Sinopack.App.Interface.Basic.Dtos;
//using Sinopack.App.Interface.Common.Dtos;
//using Sinopack.Core.Const;

namespace Basefr.Web.Controllers
{
    public class WebController : AbpController
    {
        public IWebHostEnvironment HostingEnvironment { get; set; }  //TODO: 能否注入进来？？

        public WebController()
        {

        }

        //public string MapServerPath(FileDto file)
        //{
        //    if (file == null)
        //    {
        //        return string.Empty;
        //    }
        //    //var dir = SettingManager.GetSettingValue(SettingNames.Systems.FileUploadPath);
        //    //var imgPath = $"/{dir}/{file.Path.Replace("\\", "/")}/{file.PhysicalName}";

        //    var uploadPath = SettingManager.GetSettingValue(SettingNames.Systems.FileUploadPath);
        //    var physicalPath = Path.Combine(file.Path.Split('\\', '/'));
        //    var imgPath = Path.Combine(HostingEnvironment.ContentRootPath, uploadPath, physicalPath, file.PhysicalName);  //路径

        //    return imgPath;
        //}
    }
}
